{extend name="../../base/view/common/base" /}
<!-- 主体 -->
{block name="body"}
<form class="layui-form p-4">
	<h3 class="pb-3">添加信息</h3>
	{if condition="($id == 0)"}

	{else/}
	<table class="layui-table layui-table-form">
		<tr>
			<td colspan="6"><strong>公司信息</strong></td>
		</tr>
		<tr>
			<td class="layui-td-gray-2">公司名称</td>
			<td>{$detail.company_name}</td>
			<td class="layui-td-gray">公司类型</td>
			<td>
				<select name="company_type" lay-reqText="公司类型">
					<option value="">请选择社保情况</option>
					<option value="1" <?php if($detail['company_type']==1){ echo 'selected';}?> >一般纳税人</option>
					<option value="2" <?php if($detail['company_type']==2){ echo 'selected';}?>>小规模</option>
					<option value="3" <?php if($detail['company_type']==3){ echo 'selected';}?>>个体</option>
				</select>
			</td>
		</tr>
		<tr>
			<td colspan="6"><strong>客户信息</strong></td>
		</tr>
		<tr>
			<td class="layui-td-gray-2">客户姓名</td>
			<td>{$detail.client_name}</td>
			<td class="layui-td-gray-2">客户联系电话</td>
			<td>{$detail.client_mobile}</td>

		</tr>
		<tr>
			<td colspan="6"><strong>签单信息</strong></td>
		</tr>
		<tr>
			<td class="layui-td-gray-2">签单时间</td>
			<td>{$detail.sign_date}</td>
		</tr>
		<tr>
			<td class="layui-td-gray-2">签单金额</td>
			<td>{$detail.sign_money}</td>
		</tr>
		<tr id="flow_tr">
			<td class="layui-td-gray">签单人<font>*</font></td>
			<td>{$detail.sign_name}</td>
		</tr>
		<tr>
			<td class="layui-td-gray-2">提成金额</td>
			<td>{$detail.deduct}</td>
		</tr>
		<tr>
			<td class="layui-td-gray-2">续费状态</td>
			<td>
				<select lay-reqText="续费状态">
					<option value="">请选择续费状态</option>
					<option value="0" <?php if($detail['renew_state']==0){ echo 'selected';}?>>未续费</option>
					<option value="1" <?php if($detail['renew_state']==1){ echo 'selected';}?>>已续费</option>
				</select>
			</td>
			<td class="layui-td-gray-2">续费时长</td>
			<td>{$detail.renew_length}</td>
		</tr>
		<tr>
			<td class="layui-td-gray-2">开票数</td>
			<td>{$detail.invoice_num}</td>
		</tr>
		<tr>
			<td colspan="6"><strong>签单合同附件（多附件格式）</strong></td>
		</tr>
		<tr>
			<td colspan="5" style="line-height:inherit">
				<div class="layui-row" id="fileBox">
					{notempty name="$detail.file_ids"}
					{volist name="$detail.fileArray" id="vo"}
					<div class="layui-col-md4" id="uploadImg{$vo.id}">{:file_card($vo)}</div>
					{/volist}
					{/notempty}
				</div>
			</td>
		</tr>
	</table>
	{/if}

	<div class="py-3">
	</div>
</form>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script>
    const moduleInit = ['tool', 'employeepicker', 'oaTool'];

    function gouguInit() {
        var form = layui.form, tool = layui.tool, table = layui.table, laydate = layui.laydate, oaTool = layui.oaTool,
            employeepicker = layui.employeepicker;

        //相关附件上传
        oaTool.addFile();

    }
</script>
{/block}
<!-- /脚本 -->